const mongoose = require('mongoose')
module.exports = new mongoose.Schema(
  {
    username: {
      type: String,
      unique: true,
      required: true,
    },
    password: {
      type: String,
      required: true,
    },
    registe_date: {
      type: Date,
      default: Date.now(),
    },
    lastLogin_date: {
      type: Date,
      default: Date.now(),
    },
    token: {
      type: String,
      default: '',
    },
  },
  {
    collection: 'admin',
  }
)
